{% extends 'TopxiaAdminBundle::layout.html.twig' %}
{% set menu = 'admin_edu_cloud_email_setting' %} 

{% block page_title %}
  {% if setting('cloud_status.locked') == true %}
    <div class="alert alert-warning" role="alert">{{'您的教育云服务已被锁定，请联系客服人员：'|trans}}4008041114。</div>
    {{ currentMenu.code|parent_permission.name|trans }}
  {% elseif account.status|default() == 'disable' %}
    <div class="alert alert-warning" role="alert">{{'
    您的云邮件服务已被暂停，不能使用，请联系客服人员：'|trans}}4008041114。</div>
    {{ currentMenu.code|parent_permission.name|trans }}
  {% else %}
    {{ parent() }}
  {% endif %}
{% endblock %}

{% block main %}
  <!-- 设置 -->
<div class="page-heading">
  云邮件开关
</div>
<form class="form-horizontal" method="post" action="{{ path('admin_edu_cloud_email_switch') }}">
  <div class="form-group">
    <label for="" class="col-sm-3 control-label">启用云邮件：</label>
    <div class="controls col-md-9 radios">
      <div>
        <span class="text-success">{{'已启用'|trans}}</span>
          <button class="btn btn-default btn-sm mlm" name="email-close">
            <span class="text-muted">{{'关闭'|trans}}</span>
          </button>
      </div>
      <div class="help-block">
        邮件营销，本应如此简单。<a href="{{ path('admin_cloud_show',{'type': 'email'}) }}" target="_blank">点击这里</a>了解云邮件。
      </div>
      <div class="help-block">
        注：目前云邮件仅为CRM模块提供服务
      </div>
    </div>
  </div>
  <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
</form>
{% endblock %}